Skip to content

Fix pallet_session benchmarks#9504

Merged
kianenigma merged 18 commits intomasterfrom
kiz-session-key-bench-fix
Aug 20, 2025
Merged

Fix pallet_session benchmarks#9504
kianenigma merged 18 commits intomasterfrom
kiz-session-key-bench-fix

Conversation

@kianenigma
Copy link
Copy Markdown
Contributor

@kianenigma kianenigma commented Aug 18, 2025

Fixes the benchmarking code of pallet_session such that it works with any KeyDeposit.

Reported by @bkontur in polkadot-fellows/runtimes#855

@kianenigma kianenigma requested a review from a team as a code owner August 18, 2025 12:27
@kianenigma kianenigma added T2-pallets This PR/Issue is related to a particular pallet. A4-backport-unstable2507 Pull request must be backported to the unstable2507 release branch labels Aug 18, 2025
@kianenigma
Copy link
Copy Markdown
Contributor Author

/cmd prdoc generate --bump patch

@kianenigma kianenigma changed the title fix pallet_session benchmarks Fix pallet_session benchmarks Aug 18, 2025
@kianenigma
Copy link
Copy Markdown
Contributor Author

/cmd help

@github-actions
Copy link
Copy Markdown
Contributor

Command "help" has started 🚀 See logs here

@github-actions
Copy link
Copy Markdown
Contributor

Command "help" has failed ❌! See logs here

@kianenigma
Copy link
Copy Markdown
Contributor Author

/cmd help

Comment thread prdoc/pr_9504.prdoc Outdated
@github-actions
Copy link
Copy Markdown
Contributor

Command "help" has started 🚀 See logs here

@github-actions
Copy link
Copy Markdown
Contributor

Command "help" has failed ❌! See logs here

@kianenigma
Copy link
Copy Markdown
Contributor Author

/cmd bench --runtime westend --pallet pallet_session

@github-actions
Copy link
Copy Markdown
Contributor

Command "bench --runtime westend --pallet pallet_session" has started 🚀 See logs here

@github-actions
Copy link
Copy Markdown
Contributor

Command "bench --runtime westend --pallet pallet_session" has finished ✅ See logs here

Details

Subweight results:
File Extrinsic Old New Change [%]
polkadot/runtime/westend/src/weights/pallet_session.rs purge_keys 805.44us 923.79us +14.69
polkadot/runtime/westend/src/weights/pallet_session.rs set_keys 973.69us 1.10ms +13.03
Command output:

✅ Successful benchmarks of runtimes/pallets:
-- westend: ['pallet_session']

@bkontur
Copy link
Copy Markdown
Contributor

bkontur commented Aug 18, 2025

/cmd bench --runtime westend --pallet polkadot_runtime_parachains::disputes::slashing

@github-actions
Copy link
Copy Markdown
Contributor

Command "bench --runtime westend --pallet polkadot_runtime_parachains::disputes::slashing" has started 🚀 See logs here

Comment thread substrate/frame/session/benchmarking/src/inner.rs Outdated
…end --pallet polkadot_runtime_parachains::disputes::slashing'
@github-actions
Copy link
Copy Markdown
Contributor

Command "bench --runtime westend --pallet polkadot_runtime_parachains::disputes::slashing" has finished ✅ See logs here

Details

Subweight results:
File Extrinsic Old New Change [%]
polkadot/runtime/westend/src/weights/polkadot_runtime_parachains_disputes_slashing.rs report_dispute_lost_unsigned 1.22ms 1.47ms +20.04
polkadot/runtime/westend/src/weights/pallet_session.rs purge_keys 805.44us 923.79us +14.69
polkadot/runtime/westend/src/weights/pallet_session.rs set_keys 973.69us 1.10ms +13.03
Command output:

✅ Successful benchmarks of runtimes/pallets:
-- westend: ['polkadot_runtime_parachains::disputes::slashing']

@kianenigma
Copy link
Copy Markdown
Contributor Author

/cmd bench --runtime westend --pallet pallet_session polkadot_runtime_parachains::disputes::slashing

@github-actions
Copy link
Copy Markdown
Contributor

Command "bench --runtime westend --pallet pallet_session polkadot_runtime_parachains::disputes::slashing" has started 🚀 See logs here

Comment thread substrate/frame/session/benchmarking/src/mock.rs Outdated
@kianenigma kianenigma requested a review from acatangiu as a code owner August 19, 2025 09:24
Copy link
Copy Markdown
Member

@ggwpez ggwpez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The benchmark will also work fine with KeyDeposit = 0, right?

@kianenigma
Copy link
Copy Markdown
Contributor Author

The benchmark will also work fine with KeyDeposit = 0, right?

Yes, this is used all runtimes except westend RC.

@kianenigma kianenigma enabled auto-merge August 19, 2025 14:26
@kianenigma kianenigma added this pull request to the merge queue Aug 19, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 19, 2025
@kianenigma kianenigma added this pull request to the merge queue Aug 20, 2025
Merged via the queue into master with commit b183b7e Aug 20, 2025
249 of 252 checks passed
@kianenigma kianenigma deleted the kiz-session-key-bench-fix branch August 20, 2025 09:18
@paritytech-release-backport-bot
Copy link
Copy Markdown

Created backport PR for unstable2507:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-9504-to-unstable2507
git worktree add --checkout .worktree/backport-9504-to-unstable2507 backport-9504-to-unstable2507
cd .worktree/backport-9504-to-unstable2507
git reset --hard HEAD^
git cherry-pick -x b183b7e43b41b9241c451e17c2268f6ec426adad
git push --force-with-lease

pepoviola pushed a commit that referenced this pull request Aug 26, 2025
Fixes the benchmarking code of `pallet_session` such that it works with
any `KeyDeposit`.

Reported by @bkontur in
polkadot-fellows/runtimes#855

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
alvicsam pushed a commit that referenced this pull request Oct 17, 2025
Fixes the benchmarking code of `pallet_session` such that it works with
any `KeyDeposit`.

Reported by @bkontur in
polkadot-fellows/runtimes#855

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A4-backport-unstable2507 Pull request must be backported to the unstable2507 release branch T2-pallets This PR/Issue is related to a particular pallet.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants